Computing the Longest Common Prefix of a Context-free Language in Polynomial Time

نویسندگان

  • Michael Luttenberger
  • Raphaela Palenta
  • Helmut Seidl
چکیده

We present two structural results concerning longest common prefixes of non-empty languages. First, we show that the longest common prefix of the language generated by a context-free grammar of size N equals the longest common prefix of the same grammar where the heights of the derivation trees are bounded by 4N . Second, we show that each non-empty language L has a representative subset of at most three elements which behaves like L w.r.t. the longest common prefix as well as w.r.t. longest common prefixes of L after unions or concatenations with arbitrary other languages. From that, we conclude that the longest common prefix, and thus the longest common suffix, of a context-free language can be computed in polynomial time.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Relative Prefix Distance Between Languages

The prefix distance between two words x and y is defined as the number of symbols in x and y that do not belong to their longest common prefix. The relative prefix distance from a language L1 to a language L2, if finite, is the smallest integer k such that for every word in L1, there is a word in L2 with prefix distance at most k. We study the prefix distance between regular, visibly pushdown, ...

متن کامل

Longest Path in Networks of Queues in the Steady-State

Due to the importance of longest path analysis in networks of queues, we develop an analytical method for computing the steady-state distribution function of longest path in acyclic networks of queues. We assume the network consists of a number of queuing systems and each one has either one or infinite servers. The distribution function of service time is assumed to be exponential or Erlang. Fu...

متن کامل

State Complexity of Prefix Distance

The prefix distance between strings x and y is the number of symbol occurrences in the strings that do not belong to the longest common prefix of x and y. The suffix and the substring distances are defined analogously in terms of the longest common suffix and longest common substring, respectively, of two strings. We show that the set of strings within prefix distance k from an n state DFA (det...

متن کامل

Parallelizing Assignment Problem with DNA Strands

Background:Many problems of combinatorial optimization, which are solvable only in exponential time, are known to be Non-Deterministic Polynomial hard (NP-hard). With the advent of parallel machines, new opportunities have been emerged to develop the effective solutions for NP-hard problems. However, solving these problems in polynomial time needs massive parallel machines and ...

متن کامل

Computing Vertex PI, Omega and Sadhana Polynomials of F12(2n+1) Fullerenes

The topological index of a graph G is a numeric quantity related to G which is invariant under automorphisms of G. The vertex PI polynomial is defined as PIv (G)  euv nu (e)  nv (e). Then Omega polynomial (G,x) for counting qoc strips in G is defined as (G,x) = cm(G,c)xc with m(G,c) being the number of strips of length c. In this paper, a new infinite class of fullerenes is constructed. ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2018